# toolchain.cmake

# 设置目标系统名称
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(EXTERN_TARGET_DIR ${CMAKE_SOURCE_DIR}/out/target/usr)

set(GCC_ROOT_DIR ${CMAKE_SOURCE_DIR}/prebuilts/gcc/linux-x86/am335xt3-cross-devkit/arm-arago-linux-gnueabi)
set(GCC_PREFIX arm-arago-linux-gnueabi-)

# 指定交叉编译器的路径
set(CMAKE_C_COMPILER "${GCC_ROOT_DIR}/bin/${GCC_PREFIX}gcc")
set(CMAKE_CXX_COMPILER "${GCC_ROOT_DIR}/bin/${GCC_PREFIX}g++")
set(CMAKE_ASM_COMPILER "${GCC_ROOT_DIR}/bin/${GCC_PREFIX}gcc")
set(CMAKE_AR  "${GCC_ROOT_DIR}/bin/${GCC_PREFIX}ar")


include_directories(${EXTERN_TARGET_DIR}/include)

# 指定库的查找路径
set(CMAKE_LIBRARY_PATH ${EXTERN_TARGET_DIR}/lib)

